<div>
    <Tree DataSource="_datas"
          TitleExpression="x => x.DataItem.Title"
          ChildrenExpression="x => x.DataItem.Childs"
          IsLeafExpression="x => x.TreeLevel > 2"
          OnNodeLoadDelayAsync="OnNodeLoadDelayAsync" TItem="Data"></Tree>
</div>

@code{
    public record Data(string Title)
    {
        public List<Data> Childs { get; set; } = new List<Data>();
    }

    List<Data> _datas = new() { new("A"), new("B"), new("C") };

    public async Task OnNodeLoadDelayAsync(TreeEventArgs<Data> args)
    {

        await Task.Delay(2000);//模拟异步执行

        var dataItem = ((Data)args.Node.DataItem);
        dataItem.Childs.Clear();
        dataItem.Childs.Add(new Data($"{dataItem.Title}-1"));
        dataItem.Childs.Add(new Data($"{dataItem.Title}-2"));
    }
}
